@echo off
echo Compiling Java source files...
REM Ensure the output directory exists
if not exist out mkdir out
javac -encoding UTF-8 -d out @sources.txt
if %errorlevel% neq 0 (
    echo Compilation failed!
    exit /b %errorlevel%
) else (
    echo Compilation successful.
)